const app = getApp();
let filter = require('../../../utils/intercept.js')
const http = require('../../../utils/http.js')

Page(filter.identityFilter({

  /**
   * 页面的初始数据
   */
  data: {
    activity: {}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    //查询礼品商城
    http.get('/api/index/selectActivity', {type: 1}).then(res => {
      if (res.code == 200) {
        this.setData({
          activity: res.result
        })
      }
    })
    http.get('/api/user/selectMember').then(res => {
      if (res.code == 200) {
        this.setData({
          integral: res.result.integral
        })
      }
    })
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },
}))
